import request from "../utils/request"
//增加数据
export const  addWelfare = (data) => request.post("/welfare",data);

// 获取咨询师列表
export const getConsultants = () => {
  return request.get('/consultant/list');
};

// 查询所有
export const  findWelfare = (pageNum,pageSize) => request.get("/welfare",{params:{pageNum,pageSize}});
// export const  findWelfare = (pageNum,pageSize) => request.get(`/welfare/?pageNum=${pageNum}&&pageSize=${pageSize}`,{params:{pageNum,pageSize}});

//模糊查询

export const  findLike = (search) =>
  request.get("/welfare/likeSearch",{params:search
});
//更新数据
export const reviewWelfare = ( data ) => {
  console.log(data)
  return request.put("/welfare", data)
}


//标记删除
export const removeWelfare  = ( id ) => {
  return request.put(`/welfare/delete/${id}`)
}

//批量删除
export const deleteGroupApi = (idList) => {
  return request.put(`/welfare/deleteBatch`, idList  // 发送 JSON 格式的请求体
  );
};


